function com_submit()
{
	var commentltime = getCookie('commentltime','1');
	if(commentltime != "")
	{
		var timelimit = 60;
		var nowTime = Date.parse(new Date()); 
		var nowtime = nowTime/1000;
		var total_time = commentltime + timelimit;
		if((parseInt(commentltime) + parseInt(timelimit)) > nowtime){
			alert("60秒内不可重复评论");
			return false;
		}	
	}
	
	
	var salary		= $("#salary").val();
	var environment = $("#environment").val();
	var opportunity = $("#opportunity").val();
	var pressure	= $("#pressure").val();
	var work_time	= $("#work_time").val();
	var content		= $("#content").val();

	if(salary == ""){
		alert("请选择薪资福利！");
		return false;
	}
	if(environment == ""){
		alert("请选择工作环境！");
		return false;
	}
	if(opportunity == ""){
		alert("请选择发展机遇！");
		return false;
	}
	if(pressure == ""){
		alert("请选择压力指数！");
		return false;
	}

	var work_time = $("#work_time").val();
	if(!checkNum(work_time)){
		alert("在职时间 请填写整数！");
		return false;
	}
	
	var content = KE.html("content");
	if(content == ""){
		alert("您忘了写评价哦！");
		$("#content").focus();
		return false;
	}
	var content_text = KE.text("content");
	if(content_text.length > 1000 || content_text.length < 20){
		alert("评价字数在20-1000之间");
		$("#content").focus();
		return false;
	}

	var reg = /(\w+:\/\/)?(\w+\.)?\w+\.(com|cn|org|net)/i;
	
	if(reg.test(content_text)){
		alert("对不起，您输入的内容有广告的嫌疑哦！如有疑问，请联系我们！");
		$("#content").focus();
		return false;
	}
	
	var word_obj = $("#word");
	if(word_obj.length > 0 )
	{
		word = word_obj.val();
		$.ajax({
		        type:"POST",
		        url:"/regist.php?cmd=ajaxCheckWord&word="+word,
		        success:function(msg){
					if(msg == '1'){
						$("#content").val(KE.html("content"));
						document.commentForm.submit();
					}else{
						alert("验证码不正确！");
						word_obj.focus();
						return false;
					}
		        }            
		     });
	}
	else
	{
		$("#content").val(KE.html("content"));
		document.commentForm.submit();
	}
	
}

$(document).ready(function(){
	$(".add_estimate_content ul li").click(function(){
		var img_html = $(this).html();
		KE.insertHtml("content",img_html);
	});
});